import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'providers/map_editor_provider.dart';
import 'screens/main_screen.dart';

void main() {
  runApp(const MapEditorApp());
}

class MapEditorApp extends StatelessWidget {
  const MapEditorApp({super.key});

  @override
  Widget build(BuildContext context) {
    return ChangeNotifierProvider(
      create: (context) => MapEditorProvider(),
      child: MaterialApp(
        title: '地图编辑器',
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.teal),
          useMaterial3: true,
          appBarTheme: AppBarTheme(
            backgroundColor: Colors.teal[100],
            foregroundColor: Colors.teal[800],
          ),
        ),
        home: const MainScreen(),
        debugShowCheckedModeBanner: false,
      ),
    );
  }
}
